/*
 * CurveMarker.java
 *
 * Created on 1 May 2007, 10:30
 *
 */

package pl.krakow.ae.knp.wikiboard.gui.tools.markers;

import java.awt.Graphics2D;
import java.awt.event.MouseEvent;
import pl.krakow.ae.knp.wikiboard.gui.board.Board;
import pl.krakow.ae.knp.wikiboard.gui.board.BoardEvent;
import pl.krakow.ae.knp.wikiboard.gui.drawables.Line;

/**
 *
 * @author Slawek Wojcicki
 */
public class CurveMarker extends FigureMarker
{
    
    public CurveMarker()
    {
    }
    
    public void mousePressed(MouseEvent event, Graphics2D g)
    {
        drawable = new Line(event.getPoint(), Board.getFgColor());
        drawable.draw(g, false);
    }
    
    public void mouseDragged(MouseEvent event, Graphics2D g)
    {
        drawable.drag(event);
        drawable.draw(g, false);
    }
    
    public void mouseReleased(MouseEvent event, Graphics2D g)
    {
        BoardEvent e = createEvent();
        processBoardEvent(e);
    }

    
}
